x86: Do not pollute namespace with asm defns of PERFC_*.
authorKeir Fraser <keir@xen.org>
Wed, 26 Jan 2011 08:35:24 +0000 (08:35 +0000)
committerKeir Fraser <keir@xen.org>
Wed, 26 Jan 2011 08:35:24 +0000 (08:35 +0000)
This fixes the build with perfc=y.

Signed-off-by: Keir Fraser <keir@xen.org>
xen/arch/x86/x86_32/asm-offsets.c
xen/arch/x86/x86_32/entry.S
xen/arch/x86/x86_64/asm-offsets.c
xen/arch/x86/x86_64/compat/entry.S
xen/arch/x86/x86_64/entry.S
xen/include/asm-x86/x86_32/asm_defns.h
xen/include/asm-x86/x86_64/asm_defns.h

index c3bba7f4be13b711ca735d0eb3bed34e8770cd25..3e96925d3ffc11b75030cec6cdfe480080679b19 100644 (file)
@@ -120,8 +120,8 @@ void __dummy__(void)
     BLANK();
 
 #if PERF_COUNTERS
-    DEFINE(PERFC_hypercalls, PERFC_hypercalls);
-    DEFINE(PERFC_exceptions, PERFC_exceptions);
+    DEFINE(ASM_PERFC_hypercalls, PERFC_hypercalls);
+    DEFINE(ASM_PERFC_exceptions, PERFC_exceptions);
     BLANK();
 #endif
 
index d332b8ab0b58b8e105e85cd3da0e0f0c806d53ca..2d7901fa172e5023b9858269e2d9cebcbb9ef113 100644 (file)
@@ -147,7 +147,7 @@ ENTRY(hypercall)
         GET_CURRENT(%ebx)
         cmpl  $NR_hypercalls,%eax
         jae   bad_hypercall
-        PERFC_INCR(PERFC_hypercalls, %eax, %ebx)
+        PERFC_INCR(hypercalls, %eax, %ebx)
 #ifndef NDEBUG
         /* Create shadow parameters and corrupt those not used by this call. */
         pushl %eax
@@ -446,7 +446,7 @@ handle_exception:
         movl  %esp,%edx
         pushl %edx                      # push the cpu_user_regs pointer
         GET_CURRENT(%ebx)
-        PERFC_INCR(PERFC_exceptions, %eax, %ebx)
+        PERFC_INCR(exceptions, %eax, %ebx)
         call  *exception_table(,%eax,4)
         addl  $4,%esp
         movl  UREGS_eflags(%esp),%eax
index 21b4358f93a74358f4a958d420956c6a60ba58d3..d8024bb169867f883c91435ea2ce6df7a81f5293 100644 (file)
@@ -146,8 +146,8 @@ void __dummy__(void)
     BLANK();
 
 #if PERF_COUNTERS
-    DEFINE(PERFC_hypercalls, PERFC_hypercalls);
-    DEFINE(PERFC_exceptions, PERFC_exceptions);
+    DEFINE(ASM_PERFC_hypercalls, PERFC_hypercalls);
+    DEFINE(ASM_PERFC_exceptions, PERFC_exceptions);
     BLANK();
 #endif
 
index 13e04ad370ef90656ee01a75882728658d0d2a40..d87ef0cfdecd984d0a7518c37685d5fe435c340a 100644 (file)
@@ -62,7 +62,7 @@ UNLIKELY_START(ne, compat_trace)
 #undef SHADOW_BYTES
 UNLIKELY_END(compat_trace)
         leaq  compat_hypercall_table(%rip),%r10
-        PERFC_INCR(PERFC_hypercalls, %rax, %rbx)
+        PERFC_INCR(hypercalls, %rax, %rbx)
         callq *(%r10,%rax,8)
 #ifndef NDEBUG
         /* Deliberately corrupt parameter regs used by this hypercall. */
index b30f2d0c13fa1f14ab63ef8808e104b8182e565f..a6c68220c89a58e8a2d5adfad38c3395a5beb1d0 100644 (file)
@@ -161,7 +161,7 @@ UNLIKELY_START(ne, trace)
 #undef SHADOW_BYTES
 UNLIKELY_END(trace)
         leaq  hypercall_table(%rip),%r10
-        PERFC_INCR(PERFC_hypercalls, %rax, %rbx)
+        PERFC_INCR(hypercalls, %rax, %rbx)
         callq *(%r10,%rax,8)
 #ifndef NDEBUG
         /* Deliberately corrupt parameter regs used by this hypercall. */
@@ -464,7 +464,7 @@ handle_exception_saved:
         movl  UREGS_entry_vector(%rsp),%eax
         leaq  exception_table(%rip),%rdx
         GET_CURRENT(%rbx)
-        PERFC_INCR(PERFC_exceptions, %rax, %rbx)
+        PERFC_INCR(exceptions, %rax, %rbx)
         callq *(%rdx,%rax,8)
         testb $3,UREGS_cs(%rsp)
         jz    restore_all_xen
index e81ebdfc54773b2488cff3d7841f9e5dd67c896c..93f25d8ba3052a9049b922460c7ade26e251fc60 100644 (file)
@@ -86,7 +86,7 @@
         pushl _cur;                                     \
         movl VCPU_processor(_cur),_cur;                 \
         movl __per_cpu_offset(,_cur,4),_cur;            \
-        incl per_cpu__perfcounters+_name*4(_cur,_idx,4);\
+        incl per_cpu__perfcounters+ASM_PERFC_##_name*4(_cur,_idx,4);\
         popl _cur
 #else
 #define PERFC_INCR(_name,_idx,_cur)
index 24620bae4f4d33c31c556e5cc0b0c19e8af4ecde..5c7159a7a501af89267fbf9086c439299013d0b0 100644 (file)
@@ -72,7 +72,7 @@
         leaq per_cpu__perfcounters(%rip),%rdx;  \
         addq %rdx,_cur;                         \
         popq %rdx;                              \
-        incl _name*4(_cur,_idx,4);              \
+        incl ASM_PERFC_##_name*4(_cur,_idx,4);  \
         popq _cur
 #else
 #define PERFC_INCR(_name,_idx,_cur)